#ifndef __GROUP_H__
#define __GROUP_H__

// 对应于数据库表allgroup中所有群组的信息
#include <string>
#include <vector>
#include "groupuser.h"

using namespace std;

class Group
{
public:
    Group(int id = -1, string groupName = " ", string groupDesc = " ")
    {
        this->_id = id;
        this->_groupName = groupName;
        this->_groupDesc = groupDesc;
    }

    void setId(int id)
    {
        this->_id = id;
    }
    void setName(string name)
    {
        this->_groupName = name;
    }
    void setDesc(string desc)
    {
        this->_groupDesc = desc;
    }

    int getId()
    {
        return this->_id;
    }
    string getName()
    {
        return this->_groupName;
    }
    string getDesc()
    {
        return this->_groupDesc;
    }

    vector<GroupUser> &getUsers()
    {
        return this->_users;
    }

private:
    int _id;
    string _groupName;
    string _groupDesc;
    vector<GroupUser> _users; // 该群中的所有用户成员
};

#endif